package com.example.demo.entity;

import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 咨询师设置的可预约时间表，一条记录代表一个可预约时间段
 * </p>
 *
 * @author hyb
 * @since 2024-12-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Timelist implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 咨询时间段的id
     */
    private Integer timelistId;

    /**
     * 该咨询时间段对应每周第几天
     */
    private Integer weekday;

    /**
     * 咨询时间段起始时间
     */
    private String begTime;

    /**
     * 咨询时间段结束时间
     */
    private String endTime;

    /**
     * 该时间段最多还能接受几条预约
     */
    private Integer currentCapacity;

    /**
     * 对应咨询师id
     */
    private Integer doctorId;

    /**
     * 记录最后更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 记录创建时间
     */
    private LocalDateTime createTime;
    public Timelist(Integer timelistId,Integer weekday,String begTime,String endTime,Integer currentCapacity,Integer doctorId ) {
        this.timelistId = timelistId;
        this.weekday = weekday;
        this.begTime = begTime;
        this.endTime = endTime;
        this.currentCapacity = currentCapacity;
        this.doctorId = doctorId;
        this.updateTime = LocalDateTime.now();
        this.createTime = LocalDateTime.now();
    }


}
